package com.javatest.springboot3minio.controller.convertor;

/**
 * Created with IntelliJ IDEA. Description:
 *
 * @author lzy
 * @since 2024-01-12 下午2:09
 */
public interface BiConvertor<T, K> {
  /**
   * Gets dto from do.
   *
   * @param domain the domain
   * @return the dto from do
   */
  T getDtoFromDo(K domain);

  /**
   * Gets do from dto.
   *
   * @param dto the dto
   * @return the do from dto
   */
  default K getDoFromDto(T dto) {
    throw new UnsupportedOperationException("Not support this method");
  }
}
